function good=isBitSpec(x)

good = all(size(x)==[1 3]) ...
    && all([isinteger(x(1:2)) (isinteger(x(3)) | islogical(x(3)))]) ...
    && x(1)>=1 && x(1)<=8 && all(x(2:3)>=0) && x(2)<=2 && x(3)<=1;